import QtQuick 2.0
import Sailfish.Silica 1.0
import "../config"

Item {
    id: name
    width: parent.width
    height: row.height
    property int verticalPadding: 0
    property int targetFontSize: 50
    property int fontSize: Theme.fontSizeMedium
    anchors.horizontalCenter: parent.horizontalCenter

    Row{
        id:row
        width: parent.width
        height: children.implicitHeight + 2*verticalPadding
        anchors.verticalCenter: parent.verticalCenter

        Text {
            id: fontSmall
            text: qsTr("-a")
            font.pixelSize: fontSize
            font.bold: true
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            color: AppColor.themeMode.primaryColor
            MouseArea{
                anchors.fill: parent
                onClicked: {
                    targetFontSize--;
                }
            }
        }

        Label {
            width: parent.width-fontSmall.width-fontLarge.width
            text: targetFontSize
            font.bold: true
            horizontalAlignment: Text.AlignHCenter
            color: AppColor.themeMode.primaryColor
        }

        Text {
            id: fontLarge
            text: qsTr("+A")
            font.pixelSize: fontSize
            font.bold: true
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            color: AppColor.themeMode.primaryColor
            MouseArea{
                anchors.fill: parent
                onClicked: {
                    targetFontSize++;
                }
            }
        }


    }

}
